<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">更改用户身份设置</h4>
    <button ui-sref="app.vip" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>
<div class="wrapper" ng-controller="vipUpdateCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            设置身份信息
        </div>
        <div class="panel-body">
            <div class="panel-default panel-body">
                <form name="vipInfo" class="form-horizontal form-validation" ng-submit="updateVip()">
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">身份名称</label>
                        <div class="col-sm-5">
                            <div>
                                <div class="m-b-sm inline" ng-if="vipVO.target == 0">
                                    <p class="inline m-n radio font-bold">普通用户</p>
                                </div>
                                <div class="m-b-sm inline" ng-if="vipVO.target == 1">
                                    <p class="inline m-n radio font-bold">VIP用户</p>
                                </div>
                                <div class="m-b-sm inline" ng-if="vipVO.target == 2">
                                    <p class="inline m-n radio font-bold">渠道合伙人</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">达成条件</label>
                        <div class="inline col-sm-5">
                            <select class="form-control w-sm inline m-r-xs" name="target" ng-model="vipVO.target" required>
                                <option value="">请选择条件</option>
                                <option value="0" >授权登录</option>
                                <option value="1" >累计消费</option>
                                <option value="2" >一次性充值</option>
                                <option value="3" >累计积分</option>
                            </select>
                            <div class="inline" ng-if="vipVO.target == 1 ||vipVO.target == 2 ||vipVO.target == 3 ">
                                <input type="number" min="0" step="0.01" class="inline w-xs form-control m-r-xs" name="value" ng-model="vipVO.value" required>
                                <p class="inline m-n" ng-if="vipVO.target == 1 || vipVO.target == 2">元</p>
                                <p class="inline m-n" ng-if="vipVO.target == 3">分</p>
                                <div class="form-text pull-right" ng-if="vipInfo.value.$touched">
                                    <span class="text-danger" ng-if="vipInfo.value.$error.required">(请注意条件值是必填的)</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">获得一级分佣值(%)</label>
                        <div class="col-sm-3">
                            <input type="number" min="0" step="0.01" max="100" ng-model="vipVO.oneSell" placeholder="获取所推荐的用户一级分佣占比" class="form-control" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">获得二级分佣值(%)</label>
                        <div class="col-sm-3">
                            <input type="number" min="0" step="0.01" max="100" ng-model="vipVO.twoSell" placeholder="获取所推荐的用户二级分佣占比" class="form-control" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">获得商家加盟费(%)</label>
                        <div class="col-sm-3">
                            <input type="number" min="0" step="0.01" max="100" ng-model="vipVO.joinCost" placeholder="获取所推荐的商家加盟费占比" class="form-control" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">获得商家流水值(%)</label>
                        <div class="col-sm-3">
                            <input type="number" min="0" step="0.01" max="100" ng-model="vipVO.shopIncome" placeholder="获取所推荐的商家流水占比" class="form-control" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label font-bold">权益说明</label>
                        <div class="col-sm-3">
                            <textarea class="form-control" rows="5" ng-model="vipVO.explain" placeholder="该用户身份的权益会根据您上文的勾选情况系统自动生成，此处可填写其它补充信息以便说明，最多可输入300个字符"></textarea>
                        </div>
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button type="submit" class="btn btn-success" ng-disabled="vipInfo.$invalid">保存</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

</div>